<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:c="http://java.sun.com/jsp/jstl/core"                
                xmlns:composite="http://java.sun.com/jsf/composite">
    <composite:interface>
        <!--composite:attribute name="outcomeList" type="java.lang.String"/-->
        <composite:attribute name="pageHelper" type="org.deltaset.faces.PageHelper"/>
        <composite:attribute name="pageParamName" type="java.lang.String"/>        
        <composite:attribute name="parentIdParamName" type="java.lang.String"/>
        <composite:attribute name="parentId" type="java.lang.String"/>
        <composite:attribute name="showPager"/><!-- top, bottom, both-->
        <composite:attribute name="ajaxMode" default="true"/>
        <composite:attribute name="infoMode" default="item"/><!-- item, page -->
        <composite:attribute name="title"/>
        <composite:attribute name="msgPrevious"/>
        <composite:attribute name="msgNext"/>
        <composite:attribute name="msgPageOf"/>
        <composite:attribute name="msgItemOf"/>
        <composite:attribute name="msgNoRecords"/>
    </composite:interface>

    <composite:implementation>
        <c:set var="showPager" value="#{cc.attrs.showPager}"/>
        <c:if test="#{empty cc.attrs.showPager}">
            <c:set var="showPager" value="#{deltasetConfig['showPager']}"/>
        </c:if>
        <c:set var="msgPrevious" value="#{cc.attrs.msgPrevious}"/>
        <c:if test="#{empty cc.attrs.msgPrevious}">
            <c:set var="msgPrevious" value="#{deltasetMessages['deltaset.crud.previous']}"/>
        </c:if>
        <c:set var="msgNext" value="#{cc.attrs.msgNext}"/>
        <c:if test="#{empty cc.attrs.msgNext}">
            <c:set var="msgNext" value="#{deltasetMessages['deltaset.crud.next']}"/>
        </c:if>
        <c:set var="msgPageOf" value="#{cc.attrs.msgPageOf}"/>
        <c:if test="#{empty cc.attrs.msgPageOf}">
            <c:set var="msgPageOf" value="#{deltasetMessages['deltaset.crud.pageOf']}"/>
        </c:if>
        <c:set var="msgItemOf" value="#{cc.attrs.msgItemOf}"/>
        <c:if test="#{empty cc.attrs.msgItemOf}">
            <c:set var="msgItemOf" value="#{deltasetMessages['deltaset.crud.itemOf']}"/>
        </c:if>
        <c:set var="msgNoRecords" value="#{cc.attrs.msgNoRecords}"/>
        <c:if test="#{empty cc.attrs.msgNoRecords}">
            <c:set var="msgNoRecords" value="#{deltasetMessages['deltaset.crud.norecords']}"/>
        </c:if>
        <ui:decorate template="internal/pager.xhtml">
            <ui:param name="pageHelper" value="#{cc.attrs.pageHelper}"/>
            <ui:param name="pageParamName" value="#{cc.attrs.pageParamName}"/>
            <ui:param name="parentIdParamName" value="#{cc.attrs.parentIdParamName}"/>
            <ui:param name="parentId" value="#{cc.attrs.parentId}"/>
            <ui:param name="showPager" value="#{showPager}"/>
            <ui:param name="title" value="#{cc.attrs.title}"/>
            <ui:param name="ajaxMode" value="#{cc.attrs.ajaxMode}"/>
            <ui:param name="infoMode" value="#{cc.attrs.infoMode}"/>
            <ui:param name="msgPrevious" value="#{msgPrevious}"/>
            <ui:param name="msgNext" value="#{msgNext}"/>
            <ui:param name="msgPageOf" value="#{msgPageOf}"/>
            <ui:param name="msgItemOf" value="#{msgItemOf}"/>
            <ui:param name="msgNoRecords" value="#{msgNoRecords}"/>
            <h:dataTable value="#{cc.attrs.pageHelper.items}"
                         headerClass="ui-state-default"
                         id="table"
                         var="item"
                         border="0"
                         cellpadding="0"
                         cellspacing="0"
                         styleClass="ds-grid-content ui-widget-content">
                <composite:insertChildren/>
            </h:dataTable>
        </ui:decorate>
        <script type="text/javascript">jQuery(deltaset.decorateDsGrid('#{cc.clientId}:table',{highlight:false}));</script>
    </composite:implementation>
</ui:composition>